package com.suxin.http.response.handler;

import com.suxin.http.response.HttpClientResponse;
import com.suxin.http.model.HttpRestResult;

import java.io.IOException;
import java.lang.reflect.Type;

/**
 * @author Tang
 * @classname ResponseHandler
 * @description [ 响应处理类 ]
 * @date 2023/3/2 18:56
 */
public interface ResponseHandler<T> {

    /**
     * setResponseHandlerType
     * @param type responseHandlerType
     */
    public void setResponseType(Type type);

    /**
     * handlerResponse
     * @param httpClientResponse httpClientResponse
     * @return
     */
    public HttpRestResult<T> handlerResponse(HttpClientResponse httpClientResponse) throws IOException;

}